package edu.unc.comp410.colemangeer.model.constraints;


/**
 *
 */
public interface IConstraint {
	
	/**
	 * @return name of this constraint.
	 */
	String getConstraintName();
	
	/**
	 * @return true <==> theObject satisfies all its constraints
	 */
	boolean isLegal( Object theObject );
	
	/**
	 * @throws an IllegalStateException <==> ! isLegal(theObject)
	 */
	void validate( Object theObject ) throws IllegalStateException;
}
